home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Util / Sd-Sm / ShowPages 1.4.1 ƒ / ShowPages 1.4.1 / ShowPages 1.4.1.rsrc / TEXT_132_bb.ps.txt < prev    next >
Encoding:
Text File  |  1993-05-14  |  5.3 KB  |  832 lines

  1. %! Adobe packPS Version 2.0 (9)
  2.  
  3. 50
  4. dict
  5. /$BoundingBox
  6. exch
  7. def
  8. $BoundingBox
  9. begin
  10. /xdef
  11. {
  12. exch
  13. def
  14. }
  15. def
  16. /xstore
  17. {
  18. exch
  19. store
  20. }
  21. def
  22. /addcoords
  23. {
  24. exch
  25. 4
  26. -1
  27. roll
  28. add
  29. 3
  30. 1
  31. roll
  32. add
  33. }
  34. def
  35. /-stroke
  36. /stroke
  37. load
  38. def
  39. /-fill
  40. /fill
  41. load
  42. def
  43. /-eofill
  44. /eofill
  45. load
  46. def
  47. /-image
  48. /image
  49. load
  50. def
  51. /-show
  52. /show
  53. load
  54. def
  55. /-awidthshow
  56. /awidthshow
  57. load
  58. def
  59. /-showpage
  60. /showpage
  61. load
  62. def
  63. /-restore
  64. /restore
  65. load
  66. def
  67. /-imagemask
  68. /imagemask
  69. load
  70. def
  71. end
  72. /stroke
  73. {
  74. $BoundingBox
  75. begin
  76. gsave
  77. initmatrix
  78. (stroke called\n)
  79. traceprint
  80. {
  81. strokepath
  82. 0
  83. setlinejoin
  84. flattenpath
  85. }
  86. stopped
  87. {
  88. (Can't set up a strokepath\n)
  89. traceprint
  90. grestore
  91. gsave
  92. }
  93. if
  94. includepath
  95. grestore
  96. -stroke
  97. end
  98. }
  99. def
  100. /fill
  101. {
  102. $BoundingBox
  103. begin
  104. gsave
  105. (fill called\n)
  106. traceprint
  107. includepath
  108. grestore
  109. -fill
  110. end
  111. }
  112. def
  113. /eofill
  114. {
  115. $BoundingBox
  116. begin
  117. gsave
  118. (eofill called\n)
  119. traceprint
  120. includepath
  121. grestore
  122. -eofill
  123. end
  124. }
  125. def
  126. /show
  127. {
  128. $BoundingBox
  129. begin
  130. (show called\n)
  131. traceprint
  132. 0
  133. 0
  134. 0
  135. 0
  136. 0
  137. 6
  138. -1
  139. roll
  140. awidthshow
  141. end
  142. }
  143. def
  144. /widthshow
  145. {
  146. $BoundingBox
  147. begin
  148. (widthshow called\n)
  149. traceprint
  150. 0
  151. 0
  152. 3
  153. -1
  154. roll
  155. awidthshow
  156. end
  157. }
  158. def
  159. /ashow
  160. {
  161. $BoundingBox
  162. begin
  163. (ashow called\n)
  164. traceprint
  165. 0
  166. 0
  167. 0
  168. 6
  169. 3
  170. roll
  171. awidthshow
  172. end
  173. }
  174. def
  175. /awidthshow
  176. {
  177. $BoundingBox
  178. begin
  179. gsave
  180. 6
  181. (awidthshow:)
  182. debug
  183. currentpoint
  184. 2
  185. copy
  186. /@starty
  187. xdef
  188. /@startx
  189. xdef
  190. 2
  191. index
  192. stringwidth
  193. addcoords
  194. 2
  195. index
  196. length
  197. dup
  198. 6
  199. index
  200. mul
  201. exch
  202. 5
  203. index
  204. mul
  205. addcoords
  206. 5
  207. index
  208. 3
  209. index
  210. chcount
  211. dup
  212. 9
  213. index
  214. mul
  215. exch
  216. 8
  217. index
  218. mul
  219. addcoords
  220. /@endy
  221. xdef
  222. /@endx
  223. xdef
  224. fontheight
  225. @startx
  226. @starty
  227. addcoords
  228. /@starty
  229. xdef
  230. /@startx
  231. xdef
  232. @endx
  233. @endy
  234. addcoords
  235. /@endy
  236. xdef
  237. /@endx
  238. xdef
  239. newpath
  240. @startx
  241. @starty
  242. moveto
  243. @endx
  244. @starty
  245. lineto
  246. @endx
  247. @endy
  248. lineto
  249. @startx
  250. @endy
  251. lineto
  252. closepath
  253. includepath
  254. grestore
  255. -awidthshow
  256. end
  257. }
  258. def
  259. /image
  260. {
  261. $BoundingBox
  262. begin
  263. (image called\n)
  264. traceprint
  265. gsave
  266. newpath
  267. 0
  268. 0
  269. moveto
  270. 1
  271. 0
  272. rlineto
  273. 1
  274. 1
  275. rlineto
  276. -1
  277. 0
  278. rlineto
  279. closepath
  280. includepath
  281. grestore
  282. -image
  283. end
  284. }
  285. def
  286. /imagemask
  287. {
  288. $BoundingBox
  289. begin
  290. (imagemask called\n)
  291. traceprint
  292. gsave
  293. newpath
  294. 0
  295. 0
  296. moveto
  297. 1
  298. 0
  299. rlineto
  300. 1
  301. 1
  302. rlineto
  303. -1
  304. 0
  305. rlineto
  306. closepath
  307. includepath
  308. grestore
  309. -imagemask
  310. end
  311. }
  312. def
  313. /framedevice
  314. {
  315. pop
  316. pop
  317. pop
  318. pop
  319. }
  320. def
  321. /restore
  322. {
  323. $BoundingBox
  324. begin
  325. (restore called\n)
  326. traceprint
  327. tracedump
  328. bbox-llx
  329. bbox-lly
  330. bbox-urx
  331. bbox-ury
  332. 5
  333. -1
  334. roll
  335. -restore
  336. /bbox-ury
  337. xstore
  338. /bbox-urx
  339. xstore
  340. /bbox-lly
  341. xstore
  342. /bbox-llx
  343. xstore
  344. end
  345. }
  346. def
  347. $BoundingBox
  348. begin
  349. /temp-string
  350. 10
  351. string
  352. def
  353. end
  354. /showpage
  355. {
  356. $BoundingBox
  357. begin
  358. initgraphics
  359. (showpage\n)
  360. traceprint
  361. dump-bbox
  362. /bbox-llx
  363. round_down
  364. /bbox-lly
  365. round_down
  366. /bbox-ury
  367. round_up
  368. /bbox-urx
  369. round_up
  370. bbox-llx
  371. bbox-lly
  372. moveto
  373. bbox-llx
  374. bbox-ury
  375. lineto
  376. bbox-urx
  377. bbox-ury
  378. lineto
  379. bbox-urx
  380. bbox-lly
  381. lineto
  382. closepath
  383. bwstroke
  384. 0
  385. setgray
  386. /Courier
  387. findfont
  388. 10
  389. scalefont
  390. setfont
  391. bbox-llx
  392. 36
  393. max
  394. bbox-lly
  395. 12
  396. sub
  397. 36
  398. max
  399. moveto
  400. (%%BoundingBox: )
  401. -show
  402. bbox-llx
  403. temp-string
  404. cvs
  405. -show
  406. ( )
  407. -show
  408. bbox-lly
  409. temp-string
  410. cvs
  411. -show
  412. ( )
  413. -show
  414. bbox-urx
  415. temp-string
  416. cvs
  417. -show
  418. ( )
  419. -show
  420. bbox-ury
  421. temp-string
  422. cvs
  423. -show
  424. bbox-llx
  425. 36
  426. max
  427. bbox-ury
  428. 12
  429. add
  430. 740
  431. min
  432. moveto
  433. (%%BoundingBox: )
  434. -show
  435. bbox-llx
  436. temp-string
  437. cvs
  438. -show
  439. ( )
  440. -show
  441. bbox-lly
  442. temp-string
  443. cvs
  444. -show
  445. ( )
  446. -show
  447. bbox-urx
  448. temp-string
  449. cvs
  450. -show
  451. ( )
  452. -show
  453. bbox-ury
  454. temp-string
  455. cvs
  456. -show
  457. init
  458. -showpage
  459. tracedump
  460. end
  461. }
  462. def
  463. $BoundingBox
  464. begin
  465. /init
  466. {
  467. /bbox-llx
  468. 99999
  469. store
  470. /bbox-lly
  471. 99999
  472. store
  473. /bbox-urx
  474. -99999
  475. store
  476. /bbox-ury
  477. -99999
  478. store
  479. }
  480. def
  481. /bbox-llx
  482. 0
  483. def
  484. /bbox-lly
  485. 0
  486. def
  487. /bbox-urx
  488. 0
  489. def
  490. /bbox-ury
  491. 0
  492. def
  493. /includepath
  494. {
  495. (Adding a path: )
  496. traceprint
  497. gsave
  498. initmatrix
  499. {
  500. 0
  501. setlinejoin
  502. flattenpath
  503. }
  504. stopped
  505. {
  506. (Couldn't flatten the path\n)
  507. traceprint
  508. grestore
  509. gsave
  510. initmatrix
  511. }
  512. if
  513. {
  514. pathbbox
  515. }
  516. stopped
  517. not
  518. {
  519. 4
  520. 2
  521. roll
  522. 2
  523. copy
  524. dump-coord
  525. dup
  526. bbox-lly
  527. lt
  528. {
  529. /bbox-lly
  530. xstore
  531. }
  532. {
  533. pop
  534. }
  535. ifelse
  536. dup
  537. bbox-llx
  538. lt
  539. {
  540. /bbox-llx
  541. xstore
  542. }
  543. {
  544. pop
  545. }
  546. ifelse
  547. (; )
  548. traceprint
  549. 2
  550. copy
  551. dump-coord
  552. (\n)
  553. traceprint
  554. dup
  555. bbox-ury
  556. gt
  557. {
  558. /bbox-ury
  559. xstore
  560. }
  561. {
  562. pop
  563. }
  564. ifelse
  565. dup
  566. bbox-urx
  567. gt
  568. {
  569. /bbox-urx
  570. xstore
  571. }
  572. {
  573. pop
  574. }
  575. ifelse
  576. dump-bbox
  577. }
  578. if
  579. grestore
  580. }
  581. def
  582. /bwstroke
  583. {
  584. 0
  585. setlinewidth
  586. 1
  587. setgray
  588. [5]
  589. 0
  590. setdash
  591. gsave
  592. -stroke
  593. grestore
  594. 0
  595. setgray
  596. [5]
  597. 5
  598. setdash
  599. -stroke
  600. }
  601. def
  602. /chcount
  603. {
  604. 0
  605. exch
  606. {
  607. 2
  608. index
  609. eq
  610. {
  611. 1
  612. add
  613. }
  614. if
  615. }
  616. forall
  617. exch
  618. pop
  619. }
  620. def
  621. /fontheight
  622. {
  623. currentfont
  624. begin
  625. /FontBBox
  626. load
  627. aload
  628. pop
  629. exch
  630. pop
  631. 0
  632. exch
  633. FontMatrix
  634. transform
  635. 4
  636. 2
  637. roll
  638. exch
  639. pop
  640. 0
  641. exch
  642. FontMatrix
  643. transform
  644. end
  645. }
  646. def
  647. /round_up
  648. {
  649. dup
  650. load
  651. ceiling
  652. cvi
  653. store
  654. }
  655. def
  656. /round_down
  657. {
  658. dup
  659. load
  660. floor
  661. cvi
  662. store
  663. }
  664. def
  665. /binddefinition
  666. {
  667. dup
  668. where
  669. {
  670. exch
  671. 2
  672. copy
  673. get
  674. bind
  675. put
  676. }
  677. {
  678. undefined
  679. }
  680. ifelse
  681. }
  682. def
  683. /min
  684. {
  685. 2
  686. copy
  687. ge
  688. {
  689. exch
  690. }
  691. if
  692. pop
  693. }
  694. def
  695. /max
  696. {
  697. 2
  698. copy
  699. lt
  700. {
  701. exch
  702. }
  703. if
  704. pop
  705. }
  706. def
  707. /$tracedict
  708. where
  709. {
  710. pop
  711. /debug
  712. {
  713. traceprint
  714. (\n)
  715. traceprint
  716. dup
  717. 1
  718. add
  719. copy
  720. {
  721. (    )
  722. traceprint
  723. trace=
  724. (\n)
  725. traceprint
  726. }
  727. repeat
  728. pop
  729. }
  730. def
  731. /dump-coord
  732. {
  733. (\()
  734. traceprint
  735. exch
  736. trace=
  737. (, )
  738. traceprint
  739. trace=
  740. (\))
  741. traceprint
  742. }
  743. def
  744. /dump-bbox
  745. {
  746. (Bounding Box: )
  747. traceprint
  748. bbox-llx
  749. bbox-lly
  750. dump-coord
  751. (; )
  752. traceprint
  753. bbox-urx
  754. bbox-ury
  755. dump-coord
  756. (\n)
  757. traceprint
  758. }
  759. def
  760. tracebegin
  761. }
  762. {
  763. /traceprint
  764. {
  765. pop
  766. }
  767. def
  768. /dump-coord
  769. {
  770. pop
  771. pop
  772. }
  773. def
  774. /dump-bbox
  775. {
  776. }
  777. def
  778. /debug
  779. {
  780. pop
  781. pop
  782. }
  783. def
  784. /tracedump
  785. {
  786. }
  787. def
  788. }
  789. ifelse
  790. /xdef
  791. binddefinition
  792. /xstore
  793. binddefinition
  794. /addcoords
  795. binddefinition
  796. /stroke
  797. binddefinition
  798. /fill
  799. binddefinition
  800. /eofill
  801. binddefinition
  802. /show
  803. binddefinition
  804. /widthshow
  805. binddefinition
  806. /ashow
  807. binddefinition
  808. /awidthshow
  809. binddefinition
  810. /image
  811. binddefinition
  812. /showpage
  813. binddefinition
  814. /init
  815. binddefinition
  816. /includepath
  817. binddefinition
  818. /bwstroke
  819. binddefinition
  820. /chcount
  821. binddefinition
  822. /fontheight
  823. binddefinition
  824. /debug
  825. binddefinition
  826. /dump-coord
  827. binddefinition
  828. /dump-bbox
  829. binddefinition
  830. init
  831. end
  832.